package cn.micai.base.lambda;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * 描述：Java 8 Streams filter examples
 * <p>
 *
 * @author: 赵新国
 * @date: 2018/6/21 15:17
 */
public class StreamsFilterExample {

    public static void main(String [] args) {

        List<String> lines = Arrays.asList("spring", "node", "mkyong");

        List<String> result = lines.stream()
                .filter(line -> !"mkyong".equals(line))
                .collect(Collectors.toList());

        result.forEach(System.out::println);

    }
}
